package com.cy.Service;

import com.cy.bean.CheckPoint;
import com.cy.mapper.CheckPointMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CheckPointServiceImpl implements CheckPointService {
    @Autowired
    private CheckPointMapper checkPointMapper;

    @Override
    public List<CheckPoint> getcheckpointlist() {
        List<CheckPoint> list=checkPointMapper.getcheckpointlist();
        for (int i=0;i<list.size();i++){
            list.get(i).setId(list.get(i).getCpid());
        }
        return list;
    }

    @Override
    public List<CheckPoint> getcheckpointdetail(String cpid) {
        List<CheckPoint> list=checkPointMapper.getcheckpointdetail(cpid);
        return list;
    }

}
